package com.dingzhen.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;


@Configuration
public class WebSocketConfig {

    /**
     *  检测类型为ServerEndpointConfig bean，并向标准Java WebSocket运行时注册
     *  还可以检测使用ServerEndpoint注释的bean,并进行注册
     */
    @Bean
    public ServerEndpointExporter serverEndpointExporter(){
        return new ServerEndpointExporter();
    }
}
